package cn.itcast.service.impl;

import java.util.List;

import cn.itcast.dao.ChapterDao;
import cn.itcast.dao.TestsDao;
import cn.itcast.dao.impl.ChapterDaoImpl;
import cn.itcast.dao.impl.TestsDaoImpl;
import cn.itcast.service.TestsService;
import cn.itcast.vo.Tests;
import cn.itcast.vo.extend.TestsExtend;
import cn.itcast.vo.query.TestsQuery;

public class TestsServiceImpl implements TestsService {
	private TestsDao testsDao;
	public TestsServiceImpl(){
		testsDao=new TestsDaoImpl();
	}
	@Override
	public List<TestsExtend> getTestsByChapterId(int id) {
		List<TestsExtend> list=testsDao.getTestsByChapterId(id);
		return list;
	}
	@Override
	public List<TestsExtend> getTestsByTestsType(TestsQuery tq) {
		List<TestsExtend> list=testsDao.getTestsByTestsType(tq);
		return list;
	}
	@Override
	public int getChapterSum(int textBookId) {
	int sum=testsDao.getChapterSum(textBookId);
		return sum;
	}

}
